package net.csdn.business.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @ClassName SystemFieldEnums
 * @Description TODO
 * @Author liuzhisheng
 * @Date 2023/9/15
 **/
@Getter
@AllArgsConstructor
public enum SystemFieldEnums {
    TITLE("title","标题内容"),
    ASSIGNEE("assignee","负责人"),
    LABELS("labels","标签"),
    MILESTONE("milestone","里程碑");

    final String name;
    final String msg;
    public static SystemFieldEnums ofCode(String name) {
        for (SystemFieldEnums type : SystemFieldEnums.values()) {
            if (type.name.equals(name)) {
                return type;
            }
        }
        throw new IllegalArgumentException("SystemFieldEnums param error");
    }
}
